package com.cyys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyys.entity.Adv;
import com.cyys.mapper.AdvMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.cyys.entity.CategoryGoods;
import com.cyys.mapper.CategoryGoodsMapper;
import com.cyys.service.CategoryGoodsService;

import java.util.List;

/**
 *
 * @description CategoryGoodsServiceImpl
 * @author Administrator
 * @date 2022-05-26 15:06
 */

@Service
public class CategoryGoodsServiceImpl extends ServiceImpl<CategoryGoodsMapper, CategoryGoods> implements CategoryGoodsService{

    @Resource
    private CategoryGoodsMapper categoryGoodsMapper;

    /**
     * 多表查询id
     * @param categoryGoods
     * @return
     */
    @Override
    public List<CategoryGoods> findCategoryGoodsList(CategoryGoods categoryGoods) {
        List<CategoryGoods> findCategoryGoodsList = this.baseMapper.findCategoryGoodsList(categoryGoods);
        return findCategoryGoodsList;
    }

    @Override
    public List<CategoryGoods> listByIds(Integer id) {
        return categoryGoodsMapper.listByIds(id);
    }

    /**
     * 多表查询label    推荐——新品
     * @param categoryGoods
     * @return
     */
    @Override
    public List<CategoryGoods> findCategoryGoodsListRecommend(CategoryGoods categoryGoods) {
        List<CategoryGoods> findCategoryGoodsList = this.baseMapper.findUserListRecommend(categoryGoods);
        return findCategoryGoodsList;
    }

    /**
     * 搜索
     * @param categoryGoods
     * @return
     */
    @Override
    public List<CategoryGoods> search(CategoryGoods categoryGoods) {
        return this.baseMapper.search(categoryGoods);
    }

}
